QRMIAS: First Meeting

Quantitative Research Methods – Introduction to Applied Statistics

DAVID SICHINAVA, RATI SHUBLADZE
October 3, 2017

First Meeting

Today's meeting

  • Introduction and logistics
    • Necessary software
    • Assessment, assignments, labs, etc.
  • Intro to R

What we are going to learn throughout this class?

  • What's the most effective way of collecting and analyzing data,
  • Will cover key principles of statistical data analysis,
  • Will get acquainted with key principles of working with R

What would I need for this class?

  • R;
  • R-studio;
  • A text editor;

Class website:

Class structure:

Drawing Lecture

Class structure:

Drawing Lecture

Drawing Lab

  • Practical work in R

Class structure:

Drawing Lecture

Drawing Lab

Drawing Literature

  • Key text: Imai, K. (2015): Quantiative Social Science
  • Other texts (will be available through the website)

Class structure:

Drawing Lecture

Drawing Lab

Drawing Literature

Drawing Assignments

  • During the lab sessions, we will give you lab assignments which you have to submit throughout subsequent week through Dropbox link

Assessment:

Drawing

Assessment components:

  • Assignments
  • Midterm exam (open book, take home assignment)
  • Final exam (conference paper)

Introduction to R

  • Introduction to R
  • R Graphic User Interface: R-Studio
  • Key elements of R-Studio
  • R-markdown documents
  • Literate programming, replicable social research and the best practice for organizing your projects

What is R?:

Drawing

What is R?:

  • It's a Programming Language

What is R?:

  • (One of the most widely used) Programming Language

Drawing

What is R?:

  • A programming language
  • Freely distributed
    • GPL2-GPL3 license
  • Accessible for all operational systems (Windows, Mac, Linux, etc…)

What is R?:

Drawing

What is R-Studio?:

  • For a long time, the lack of the GUI has been labelled as a main drawback for R users

  • R-Studio does this job very well.

What is R-Studio?:

Drawing

Help:

### General help:
help.start()

Help:

### Help on a particular function
help(lm) ## or
?lm

### Show me an example!
example(lm)


### Show me a vignette for a funtion/library
vignette("ggplot2-specs")

Working directory:

getwd()

Working directory:

setwd("D:/Dropbox/R/My awesome research")

or

setwd("D:\\Dropbox\\R\\My awesome research")

or

setwd('D:\\Dropbox\\R\\My awesome research')

Libraries:

install.packages("AwesomeLibrary")
library("AwesomeLibrary")

Scripts:

source("MyAwesomeRegression.R")

Documenting and replicating the research

Drawing

Source: Baker, M. (2016): Is there a reproducibility crisis? Nature. Vol. 533.

Documenting and replicating the research

However…

The lexicon of reproducibility to date has been multifarious and ill-defined. The causes of and remedies for what is called poor reproducibility, in any scientific field, require a clear specification of the kind of reproducibility being discussed (methods, results, or inferences), a proper understanding of how it affects knowledge claims, scientific investigation of its causes, and an improved understanding of the limitations of statistical significance as a criterion for claims

Goodman, S., Fanelli, D., Ioannidis, J. (2016): What does research reproducibility mean?

Documenting and replicating the research

  • Standards (King, 1995): > The replication standard holds that sufficient information exists with which to understand, evaluate, and build upon a prior work if a third party can replicate the results without any additional information from the author
  • Data reposotories (Dataverse @ Harvard, Figshare, Open Science Framework)
  • Version control (Git, Github, Bitbucket)
  • Preregistration (Open Science Framework, Center for Open Science, EGAP)

Source: Marwick, B. (2014): Reproducible Research: A primer for the social sciences

Literate programming:

Drawing

Literate programming:

Documentation must be regarded as an integral part of the process of design and coding. A good programming language will encourage and assist the programmer to write clear, self-documenting code, and even perhaps to develop and display a pleasant style of writing.

Hoare, T. (1973): Hints on Programming Language Design. [in:] Knuth, D. (1983): Literate Programming. The Computer Journal

R-notebook:

Drawing

R-notebook: markup

Drawing

Best practices for project management

  • Transparency
  • Support
  • Organize your code as modules
  • Portability

Best practices for project management

  1. Brief description of your study
  2. Installing and loading all necessary libraries
  3. Setting the absolute path from the beginning and then working using relative paths
  4. Organizing your code in sections
  5. Functions
  6. Concise naming standards for your variables
  7. Concise organization of files, folders and subfolders

Best practices for project management

Drawing

Assignments:

  • Lab
    • Annotated bibliography

Annotated bibliography:

  • Citation + short critical review of an article
    • Short means SHORT: max. 150-200 words
  • Key findings
  • Key drawbacks
  • Example:

Drawing